In image coding, a method of superimposing different motion image sequences has been considered. An article titled "An Image Coding Scheme Using Layered Representation and Multiple Templates" (Technical Report of IEICE, IE94-159, pp. 99-106 (1995)) describes a scheme for superimposing a motion image sequence as a background and another motion image sequence of a component or part image (e.g., video image of a human figure or fish cut out by chromakey technique) as a foreground, to generate a new image sequence.
FIG. 12 is a block diagram showing a coding apparatus and a decoding apparatus according to the conventional art. A pixel data coding portion 1201 in FIG. 12 is a portion for coding pixel data representing intensity and color difference, and a shape data coding portion 1202 is for coding shape data representing a shape of part image. These portions constitute an apparatus for coding a part image.
Shape data are used for coding pixel data. A pixel data decoding portion 1203 in FIG. 12 is a portion for decoding pixel data, and a shape data decoding portion 1204 is for decoding shape data. These portions constitute an apparatus for decoding a part image. For decoding pixel data, decoded shape data are used.
Shape data coding portion 1202 first expresses a contour of a shape using 8 directional chain codes, for example, and then codes the chain codes by Huffman coding. Pixel data coding portion 1201 codes pixel data by the international standard method of coding motion images, such as MPEG or H.261. When pixel data are divided into blocks, an arbitrary shape DCT technique or the like is employed for the block including a boundary of part image.
Each part image is decoded by a decoding apparatus, and then superimposed at a superimposing portion (not shown) using shape data, and displayed on a device like a display. For example, when superimposing a part image p (i,j) in arbitrary shape on a rectangular background image b (i,j), a display image f (i,j) is generated using shape data s (i,j) according to the following expression (1): EQU f(i,j)=p(i,j)s(i,j)+b(i,j)[1-s(i,j)] (1)
wherein (i,j) represents a coordinate of a pixel, and f(i,j) represents a pixel value. s(i,j) assumes the value "1" within a part image, and "0" outside the part image.
In the conventional art, however, there has not been proposed a technique for setting up spatial hierarchy for a part image. The international standard MPEG2 method realizes hierarchy (i.e., spatial hierarchy) over an entire image. In the method, data in a lower layer having low spatial resolution throughout the entire image and data in an upper layer for improving the resolution are decoded together to achieve high spatial resolution.
Accordingly, an object of the present invention is to provide an image coding apparatus and an image decoding apparatus that can realize spatial hierarchy in a part image.
To obtain shape data of low resolution, high-resolution shape data obtained by the conventional art may simply be thinned out. However, if thus obtained low-resolution image is displayed on a large-screen monitor having low resolution, the contour of a part will have stepwise appearance, which leads to deterioration in psychic image quality. The same problem arises when a low-resolution image is enlarged for display on a large-screen monitor having high resolution.
Accordingly, another object of the present invention is to provide an image coding apparatus and an image decoding apparatus that can solve the above problem.